package com.espresso.espressodemo;

import android.app.Activity;
import android.content.Intent;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;


public class TextActivity extends Activity{

    Button btn_text;
    EditText et_text;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_text);
        btn_text = (Button)findViewById(R.id.btn_text);
        et_text = (EditText)findViewById(R.id.et_text);
        btn_text.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(TextActivity.this,MenuActivity.class);
                Bundle bundle = new Bundle();
                intent.putExtra("text", et_text.getText().toString());
                startActivity(intent);
            }
        });
    }

}
